//
//  UICollectionView+EmptyData.m
//  MPFindPart
//
//  Created by xalo on 16/5/3.
//  Copyright © 2016年 马鹏. All rights reserved.
//

#import "UICollectionView+EmptyData.h"

@implementation UICollectionView (EmptyData)

-(NSInteger)showMessage:(NSString *)title  byDataArrayCount:(NSInteger)count{
    
    if (count == 0) {
        
        self.backgroundView = ({
        
            UILabel *label = [[UILabel alloc] init];
            label.text = title;
            label.textAlignment = NSTextAlignmentCenter;
            label.alpha = 0.5;
            label;
        });
        
        
    }else{
        
        self.backgroundView = nil;
        
    }
    return count;
    
}

@end
